#include "queue.h"
void
-enqueue(queue *new, queue *old)
+enqueue(queue *new_el, queue *old)
{
- new->next = old->next;
- new->prev = old;
- old->next->prev = new;
- old->next = new;
+ new_el->next = old->next;
+ new_el->prev = old;
+ old->next->prev = new_el;
+ old->next = new_el;
}
queue *
struct queue *prev;
} queue;
-void enqueue(queue *new, queue *old);
+void enqueue(queue *new_el, queue *old);
queue * dequeue(queue *element);
#define QUEUE_INIT(head) (head)->next = (head)->prev = head
route_head_alloc(void)
{
route_head *rte_head;
- rte_head = xcalloc(sizeof (*rte_head), 1);
+ rte_head = (route_head *) xcalloc(sizeof (*rte_head), 1);
QUEUE_INIT(&rte_head->Q);
return rte_head;
}